package com.jerry.api.service.impl;

import com.jerry.api.entity.JAddress;
import com.jerry.api.mapper.JAddressMapper;
import com.jerry.api.service.JAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Date: 2025/4/7 14:59
 * @Created: by 王永发
 * @Description: ScoreServiceImpl
 */

@Service
public class JAddressServiceImpl implements JAddressService {
    @Autowired
    JAddressMapper addressMapper;

    @Override
    public List<JAddress> getAddress(String code) {
        if (code == null)
            return addressMapper.getAddressByLevel("1");
        List<JAddress> addressByParent = addressMapper.getAddressByParent(code);
        return addressByParent;
    }


}
